#ifndef _ADVANCEDMOVIEITEM
#define _ADVANCEDMOVIEITEM

#include "ofVideoPlayer.h"
#include "ofImage.h"
#include "ofMath.h"

class advancedMovieItem : public ofVideoPlayer{

	public:
	 typedef ofVideoPlayer super;

	advancedMovieItem ();

	void animate(bool bAnimate);
	void shrink(float factor);
    void rotate(float x, float y, float z);
    void move(int _x, int _y);
	void motionPath();
    bool togglePause();
    void setPaused(bool _bPaused);
    void showSliderShrink();
    void showSliderRotateZ();
    void showSliderTimeLine();
    void moveThroughTimeLine(float _position);

    bool mouseDragged(int x, int y, int button);
    bool mousePressed(int x, int y, int button);
    bool mouseReleased(int x, int y, int button);

	//Overwrite from ofVideoPlayer
	void draw(float x, float y);


	bool bAnimate;
	bool bShrinkEnd;
	bool dLeftDoublepressed;
    bool bSlidePauseState;
	bool bShowSliderShrink, bShowSliderRotateZ, bShowSliderTimeLine;

	float shrinkFactor;
	float minShrink, maxShrink;

	float rotateZ;

	int shiftX, shiftY;
    int x,y;
    bool bMousePressed;
	int mouseStartX, mouseStartY;
	int  mouseShiftX, mouseShiftY;
	int mouseX, mouseY;

	float timer;

	 ofImage polaroid;
};
#endif

